[SVM] Correct compile time compare of CONFIG_PAGING_LEVELS for 64bit and
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 26 Jul 2006 10:10:26 +0000 (11:10 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 26 Jul 2006 10:10:26 +0000 (11:10 +0100)
32bit PAE guests. This code affects accesses to the CR4 register by the SVM guest.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
xen/arch/x86/hvm/svm/svm.c

index 0fc10b0715a4960563bacfc6c91f97b1b09916bd..998611220e46ea9d64f8f698745719ea284c3600 100644 (file)
@@ -1766,7 +1766,7 @@ static int mov_to_cr(int gpreg, int cr, struct cpu_user_regs *regs)
             if ( svm_pgbit_test(v) )
             {
                 /* The guest is a 32-bit PAE guest. */
-#if CONFIG_PAGING_LEVELS >= 4
+#if CONFIG_PAGING_LEVELS >= 3
                 unsigned long mfn, old_base_mfn;
 
                 if( !shadow_set_guest_paging_levels(v->domain, PAGING_L3) )
@@ -1810,7 +1810,7 @@ static int mov_to_cr(int gpreg, int cr, struct cpu_user_regs *regs)
             else
             {
                 /*  The guest is a 64 bit or 32-bit PAE guest. */
-#if CONFIG_PAGING_LEVELS >= 4
+#if CONFIG_PAGING_LEVELS >= 3
                 if ( (v->domain->arch.ops != NULL) &&
                         v->domain->arch.ops->guest_paging_levels == PAGING_L2)
                 {